<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>json数据的嵌套</title>
</head>
<body>
    <script type="text/javascript">
        /**
         * json数组的元素是对象
         * 对象是键值对格式
         */
        var jsonArray = [
            {"name":"zhangsna","age":28},
            {"name":"wangwu","age":18}
        ];
        console.log(jsonArray[1].name + "===" + jsonArray[1].age)
        for (var i = 0; i < jsonArray.length; i++) {
            console.log(jsonArray[i].name + "===" + jsonArray[i].age)
        }

    </script>
</body>
</html>